<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/styles/replyDetail.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <link type="text/css" rel="stylesheet" href="/js/plugins/uploadifive/uploadifive.css" />
    <script type="text/javascript" src="/js/plugins/uploadifive/jquery.uploadifive.min.js"></script>
</head>
<body>
<div data-anchor="comment">
    <div class="row row-reviewForm" id="comment_20190714202243" data-cs-p="点评">
        <div class="wrapper">

            <div class="mfw-reviews">
                <div id="_j_commentform_cnt">
                    <h2>
                        <strong>${(detail.name)!}</strong>
                        <em>*</em>为必填选项
                    </h2>
                    <form action="/scenic/save" method="post" class="_j_commentdialogform" data-typeid="3" id="inputForm">
                        <input type="hidden" name="detailId" value="${(detailId)!}"/>
                        <input type="hidden" name="coverUrl" value="updateComment">
                        <input type="hidden" name="commentid" value="">
                        <input type="hidden" name="poiid" value="25091">
                        <input type="hidden" name="source" value="2">
                        <div class="review-item item-star">
                            <div class="label"><em>*</em>总体评价</div>
                            <div class="review-star _j_rankblock" data-star="" name="rank">
                                <input type="hidden" name="totalStar" value="" essential="1" data-inputname="总体评价">
                                <span class="_j_starcount star0"></span>
                                <div class="click-star _j_starlist">
                                    <a role="button" title="千万别去" rel="nofollow"></a>
                                    <a role="button" title="不推荐" rel="nofollow"></a>
                                    <a role="button" title="一般般" rel="nofollow"></a>
                                    <a role="button" title="值得一去" rel="nofollow"></a>
                                    <a role="button" title="必须推荐" rel="nofollow"></a>
                                </div>

                            </div>
                            <span class="txt-tips _j_startip">点击星星打分</span>
                        </div>
                        <div class="review-group">
                            <div class="review-item item-rating"
                                 data-conf="{&quot;type&quot;:&quot;select&quot;,&quot;notnull&quot;:&quot;1&quot;,&quot;name&quot;:&quot;\u98ce\u5149&quot;,&quot;conf&quot;:{&quot;options&quot;:[&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;]},&quot;show&quot;:{&quot;style&quot;:&quot;starRank&quot;}}">
                                <div class="label"><em>*</em>风光</div>
                                <div class="review-score _j_rankblock" data-star="" name="scene_rank">
                                    <input type="hidden" name="sceneryStar" value="" essential="1"
                                           data-inputname="给风光的评分">
                                    <span class="_j_starcount star0"></span>
                                    <div class="click-star _j_starlist">
                                        <a role="button" title="特别差" rel="nofollow"></a>
                                        <a role="button" title="不太好" rel="nofollow"></a>
                                        <a role="button" title="一般般" rel="nofollow"></a>
                                        <a role="button" title="很棒" rel="nofollow"></a>
                                        <a role="button" title="超出预期" rel="nofollow"></a>
                                    </div>
                                </div>
                                <span class="txt-tips _j_startip">给风光打分</span>
                            </div>
                            <div class="review-item item-rating"
                                 data-conf="{&quot;type&quot;:&quot;select&quot;,&quot;notnull&quot;:&quot;1&quot;,&quot;name&quot;:&quot;\u7279\u8272&quot;,&quot;conf&quot;:{&quot;options&quot;:[&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;]},&quot;show&quot;:{&quot;style&quot;:&quot;starRank&quot;}}">
                                <div class="label"><em>*</em>特色</div>
                                <div class="review-score _j_rankblock" data-star="" name="feature_rank">
                                    <input type="hidden" name="featureStar" value="" essential="1"
                                           data-inputname="给特色的评分">
                                    <span class="_j_starcount star0"></span>
                                    <div class="click-star _j_starlist">
                                        <a role="button" title="特别差" rel="nofollow"></a>
                                        <a role="button" title="不太好" rel="nofollow"></a>
                                        <a role="button" title="一般般" rel="nofollow"></a>
                                        <a role="button" title="很棒" rel="nofollow"></a>
                                        <a role="button" title="超出预期" rel="nofollow"></a>
                                    </div>

                                </div>
                                <span class="txt-tips _j_startip">给特色打分</span>
                            </div>
                            <div class="review-item item-rating"
                                 data-conf="{&quot;type&quot;:&quot;select&quot;,&quot;notnull&quot;:&quot;1&quot;,&quot;name&quot;:&quot;\u670d\u52a1&quot;,&quot;conf&quot;:{&quot;options&quot;:[&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;]},&quot;show&quot;:{&quot;style&quot;:&quot;starRank&quot;}}">
                                <div class="label"><em>*</em>服务</div>
                                <div class="review-score _j_rankblock" data-star="" name="service_rank">
                                    <input type="hidden" name="serviceStar" value="" essential="1"
                                           data-inputname="给服务的评分">
                                    <span class="_j_starcount star0"></span>
                                    <div class="click-star _j_starlist">
                                        <a role="button" title="特别差" rel="nofollow"></a>
                                        <a role="button" title="不太好" rel="nofollow"></a>
                                        <a role="button" title="一般般" rel="nofollow"></a>
                                        <a role="button" title="很棒" rel="nofollow"></a>
                                        <a role="button" title="超出预期" rel="nofollow"></a>
                                    </div>

                                </div>
                                <span class="txt-tips _j_startip">给服务打分</span>
                            </div>
                        </div>
                        <div class="review-item item-comment">
                            <div class="label"><em>*</em>评价</div>
                            <div class="content">
                                <textarea class="_j_commentarea" name="remarkContent.content" essential="1" data-inputname="点评内容"
                                          placeholder="详细、客观、真实，130字以上为佳！上传图片会加分哦！" data-minlen="15"
                                          data-maxlen="1000"></textarea>
                                <p class="_j_commentcounttip">15-1000个字</p>
                            </div>
                        </div>


                        <div class="review-item item-photo">
                            <div class="label">上传照片</div>
                            <div class="content">
                                <div class="form-group">
<#--                                    <label  class="col-sm-3 control-label">封面：</label>-->
                                    <div class="col-sm-6">
                                        <input type="hidden"  class="form-control" id="coverUrl"  name="coverUrl" value="" >
                                        <img src="/images/default.jpg" width="100px" id="imgUrl">
                                        <button type="button" class="imgBtn">浏览</button>
                                    </div>
                                </div>
<#--                                <dl class="upload-box _j_piclist">-->
<#--                                    <dd data-commentid="" id="_j_addpicbtns" ids="0" style="position: relative;">-->
<#--                                        <a class="add-place"><i></i></a>-->
<#--                                        <div id="html5_1dfo6usgd1maqh5812ivtkf1n223_container"-->
<#--                                             class="moxie-shim moxie-shim-html5"-->
<#--                                             style="position: absolute; top: 0px; left: 0px; width: 120px; height: 120px; overflow: hidden; z-index: -1;">-->
<#--                                            <input id="html5_1dfo6usgd1maqh5812ivtkf1n223" type="file"-->
<#--                                                   style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"-->
<#--                                                   multiple="" accept="image/jpeg,image/gif,image/png,.JPEG"></div>-->
<#--                                    </dd>-->
<#--                                </dl>-->
                            </div>
                        </div>
                        <div class="review-item item-action">
                            <a class="btn-large _j_submit" role="button" title="提交点评">提交点评</a>
                            <script>
                                $(function () {
                                    //图片上传
                                    $('.imgBtn').uploadifive({
                                        'auto' : true,    //自动提交
                                        'uploadScript' : '/uploadImg',  //图片上传过来处理路径(接受)
                                        'buttonClass':"btn-link",  //按钮的样式
                                        'fileObjName' : 'pic',  // 图片文件上传之后, 在springmvc 映射方法接受的参数名
                                        'buttonText' : '浏览...',  //按钮上面文字
                                        'fileType' : 'image',   //指定上传的图片
                                        'multi' : false,   //是否为多文件上传, 此处设置单文件
                                        'fileSizeLimit'   : 5242880,  //文件上传大小
                                        'removeCompleted' : true, //取消上传完成提示
                                        'uploadLimit' : 1,  //一次允许上传文件个数
                                        //'queueSizeLimit'  : 10,  //文件上传等待队列大小
                                        'overrideEvents': ['onDialogClose', 'onError'],    //onDialogClose 取消自带的错误提示
                                        'onUploadComplete' : function(file, data) {

                                            //data 请求方法处理完之后, 传回来的数据: 约定: 图片的路径(url)
                                            $("#imgUrl").attr("src" , "/" + data);
                                            $("#coverUrl").val("/" + data);

                                        },
                                        onFallback : function() {
                                            $.messager.alert("温馨提示","该浏览器无法使用!");
                                        }
                                    });

                                    $('._j_submit').click(function () {
                                        $('#inputForm').ajaxSubmit(function (data) {
                                            if(data.success){
                                                console.log(data);
                                                window.location.href="/scenic/detail?detailId=${(detailId)!}&destId=${(destId)!}"//todo 不知道如何跳转
                                            }else{
                                                $.messager.alert("温馨提示", data.msg)
                                            }
                                        })
                                    })
                                })
                            </script>
                        </div>
                    </form>
                </div>
            </div>
            <script type="text/javascript">

                $(function () {
                    $("._j_starlist a").mouseover(function () {
                        var index = $(this).index()+1;
                        var text = $(this).attr("title");

                        $(this).closest("div").prev().addClass("star"+index);
                        $(this).closest("div").parent().next().html(text);
                    }).mouseout(function () {
                        var index = $(this).index()+1;
                        var text = $(this).attr("title");
                        $(this).closest("div").prev().removeClass("star"+index);
                        $(this).closest("div").parent().next().html(text);

                        var x = $(this).closest("div").prev().prev().val();
                        if(x == index){
                            $(this).closest("div").prev().addClass("star"+x);
                        }


                    }).click(function () {
                        var index = $(this).index()+1;
                        var text = $(this).attr("title");
                        $(this).closest("div").prev().addClass("star"+index);
                        $(this).closest("div").parent().next().html(text);

                        $(this).closest("div").prev().prev().val(index);

                    })
                })

            </script>



            <div class="mfw-reviews have-reviews" style="display: none">
                <h2>
                    <strong>广州塔</strong>
                </h2>
                <div class="review-item item-star">
                    <div class="label">你已评价为</div>
                    <div class="review-star">
                        <span class="star0"></span>
                    </div>
                    <a class="edit-reviews" data-commentid="" title="修改评论"><i></i>我要修改</a>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>